package com.csvw.skr.newTask.entity.visit;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by Administrator on 2016/12/7.
 */
@Entity
@Table(name = "csvw_skr_task_visit_mission")
public class Mission{
    /**
     * 店访任务的ID， 发布者ID_当前日期（时间戳）
     */
    @Id
    @Column(name = "pk_id", length = 30)
    private String id;

    /**
     * 店访任务名称
     */
    @Column(length = 20)
    private String name;

    /**
     * 店访任务描述
     */
    @Column(length = 200)
    private String description;

    /**
     * 店访任务发布者
     */
    @Column(length = 20)
    private String publisher;

    /**
     * 店访任务是否有检查表
     */
    @Column(nullable=false, columnDefinition="bit default 0")
    private boolean checklist;

    /**
     * 店访任务的类型
     * 1   必须
     * 2   可选
     * 3   自定义
     */
    @Column(nullable=false, columnDefinition="int default 3")
    private int type;


    /**
     * 数据是否有效
     */
    @Column(nullable=false, columnDefinition="bit default 1")
    private boolean active;

    /**
     * 数据创建时间
     */

    private Date created;

    /**
     * 数据更新时间
     */
    private Date updated;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public boolean isActive() {
        return active;
    }

    public void setActive(boolean active) {
        this.active = active;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public Date getUpdated() {
        return updated;
    }

    public void setUpdated(Date updated) {
        this.updated = updated;
    }

    public boolean isChecklist() {
        return checklist;
    }

    public void setChecklist(boolean checklist) {
        this.checklist = checklist;
    }
}
